
package za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Adapter.Model;


public class TempretureClassReporter extends CelcuisReporter implements TempretureInfo
{

    @Override
    public double getTempretureInF() { return tempretureInC; }
    
    @Override
    public double getTempretureInC() { return cToF(tempretureInC); }
    
    @Override
    public void setTempretureInC(double tempretureInC) { this.tempretureInC = tempretureInC; }

    @Override
    public void setTempretureInF(double tempretureInF) { this.tempretureInC = fToC(tempretureInF); }

    
    private double fToC( double f){ return ( (f-32) * 5 / 9);}
    private double cToF( double c){ return ( (c * 9 / 5) +32 );} 
}